package lfp.addressselector;

import android.app.Activity;

import lfp.addressselector.ui.AddressSelectActivity;

/**
 * Created by Administrator on 2017/6/6.
 */

public class AddressSelectorHelper {

    /**
     * 请求选择地址
     *
     * @param activity   Activity实例
     * @param resultCode Activity中接收数据的回调码
     */
    public static final void ChooseAddr(Activity activity, int resultCode) {
        ChooseAddr(activity, ScopeLevel.County, resultCode);
    }


    /**
     * 请求选择地址
     *
     * @param activity   Activity实例
     * @param level      选择范围限定级别
     * @param resultCode Activity中接收数据的回调码
     */
    public static final void ChooseAddr(Activity activity, ScopeLevel level, int resultCode) {
        AddressSelectActivity.start(activity, level, resultCode);
    }

    //选择范围
    public enum ScopeLevel {
        /**
         * 省份级
         */
        Province,
        /**
         * 市级
         */
        City,
        /**
         * 区县级
         */
        County;

    }
}
